/**
 * 
 */
package com.jian.JNIMS.entity;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * <p> Project name:JNIMS </p>
 * <p> Class name:Student </p>
 * @author "JiHongru"
 * @version
 * @date 2020年2月9日下午6:13:30
 * @description
 *
 */
@Entity
@Table(name = "student")
public class Student {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;
	
	private String name;
	
	private Date return_time;
	
	private String address;
	
	private String idCard;
	
	private String address_detail;
	
	@OneToOne
	@JoinColumn(name = "familyId", referencedColumnName = "id")
	private Family family;

	/**
	 * 
	 */
	public Student() {
	}

	/**
	 * @param id
	 * @param name
	 * @param return_time
	 * @param address
	 * @param idCard
	 * @param address_detail
	 * @param family
	 */
	public Student(int id, String name, Date return_time, String address, String idCard, String address_detail,
			Family family) {
		super();
		this.id = id;
		this.name = name;
		this.return_time = return_time;
		this.address = address;
		this.idCard = idCard;
		this.address_detail = address_detail;
		this.family = family;
	}

	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the return_time
	 */
	public Date getReturn_time() {
		return return_time;
	}

	/**
	 * @param return_time the return_time to set
	 */
	public void setReturn_time(Date return_time) {
		this.return_time = return_time;
	}

	/**
	 * @return the address
	 */
	public String getAddress() {
		return address;
	}

	/**
	 * @param address the address to set
	 */
	public void setAddress(String address) {
		this.address = address;
	}

	/**
	 * @return the idCard
	 */
	public String getIdCard() {
		return idCard;
	}

	/**
	 * @param idCard the idCard to set
	 */
	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}

	/**
	 * @return the address_detail
	 */
	public String getAddress_detail() {
		return address_detail;
	}

	/**
	 * @param address_detail the address_detail to set
	 */
	public void setAddress_detail(String address_detail) {
		this.address_detail = address_detail;
	}

	/**
	 * @return the family
	 */
	public Family getFamily() {
		return family;
	}

	/**
	 * @param family the family to set
	 */
	public void setFamily(Family family) {
		this.family = family;
	}
	
}
